Digging into the Visitor Pattern

نویسندگان

  • Fabian Büttner
  • Oliver Radfelder
  • Arne Lindow
  • Martin Gogolla
چکیده

In this paper we present an alternative to the VISITOR pattern, DYNAMIC DISPATCHER, that can be applied to extend existing software in a nonintrusive way, and which simulates covariant overriding of visit methods. It allows to express polymorphic operations through visitor classes in a more natural way than the original VISITOR pattern. Our solution DYNAMIC DISPATCHER can be applied without touching existing domain classes. Therefore, it is especially useful to extend frameworks and libraries. We have implemented DYNAMIC DISPATCHER as a small framework in Java and conducted performance measurements which show that the overhead is acceptable in most real world

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

From Patterns to Components: The Visitor Library

To what extent can design patterns be turned into reusable, off-the-shelf components, taking advantage of advanced language features? We reviewed the patterns described in the book Design Patterns by Gamma et al. [5], and established a new classification of these patterns by level of “componentizability” (possibility to transform a design pattern into a reusable component) [1]. This article rep...

متن کامل

Visitor-Oriented Programming

Multiple dispatching and the visitor pattern are approaches to making object-oriented programs more extensible. Both have a flavor of pattern matching, thereby moving objectoriented programming closer to functional programming. The key idea of these approaches can be crystallized as a notion of visitor which lies between functions and objects. Can this idea be developed into a new form of visit...

متن کامل

Reflective Visitor Pattern

The Visitor pattern wraps associated operations that are performed on the elements of an object structure into a separate object. It allows the software designer to define new kinds of operations over the object structure without changing the classes of this structure. But a well-known drawback of this standard Visitor structure is that extending the object structure is hard. This paper present...

متن کامل

Using Generative Programming to Enhance Reuse in Visitor Pattern-based DSML Model Interpreters

An important part of domain-specific modeling language (DSML) tools is model interpretation – the translation of constructed models into useful artifacts, such as dense XML configuration files or source files, or other model representations. When the same DSML is used for different purposes, e.g., generating metadata for platform deployment or performance analysis, or creating composite DSMLs, ...

متن کامل

Visual Analysis of Human Movement Data

In this paper we present our visual analysis results of visitor movement data in an amusement park during a weekend. We assume most people move among several amusement park spots in a specific pattern. And for few people whose movement pattern don’t belong to any group we assume, we pay special concern about their route for they may related to a crime happened in amusement park during the weeke...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004